package com.hup.sidebar.androidService;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

import com.hup.sidebar.R;
import com.hup.sidebar.constant.AppConstant;
import com.hup.sidebar.framework.util.ToastUtil;

/**
 * @author hugan
 * @date 2024/2/24
 */
public class AppBroadcastReceiver extends BroadcastReceiver {
    private static final String TAG = AppBroadcastReceiver.class.getSimpleName();

    public AppBroadcastReceiver() {
        Log.i(TAG, "init: ");
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        Log.i(TAG, "onReceive: " + intent.getAction());
        if (AppConstant.ACTION_TEMP_HIDE_NOTI_CLICK.equals(intent.getAction())) {
            AppService.switchService(true);
            ToastUtil.short_(context.getString(R.string.service_started));
        }
    }

}
